home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig22_11.jar / Ch22 / Fig22_11 / Fig22_11.c
C/C++ Source or Header  |  1993-11-09  |  223b  |  11 lines

  1. /* Right justifying and left justifying values */
  2. #include <stdio.h>
  3.  
  4. main()
  5. {
  6.    printf("%10s%10d%10c%10f\n\n", "hello", 7, 'a', 1.23);
  7.    printf("%-10s%-10d%-10c%-10f\n", "hello", 7, 'a', 1.23);
  8.    return 0;
  9. }
  10.  
  11.